#!/usr/bin/env ruby

qs = File.open('quicksilver/Jakl .rb').read

qs.sub!("/usr/bin/env ruby", `which ruby`)

Dir.mkdir(ENV["HOME"] + '/Library/Application Support/Quicksilver/Actions') rescue nil

File.open(ENV["HOME"] + '/Library/Application Support/Quicksilver/Actions/Jakl .rb', 'w') do |f|
  f.write qs
end

puts 'Successfully installed Jakr Quicksilver action'